library(dplyr)
sp_list_corrected_ver2_1_ %>%
mutate(across(c(matk, trnh_psba, rbcL), na_if, "na"))
View(sp_list_corrected_ver2_1_)
sp_list_corrected_ver2_1_ %>%
mutate_all(., replace(., .=="na", NA))
sp_list_corrected_ver2_1_ %>%
mutate(na_if("na", NA))
rm(sp_list_corrected_ver2_1_)
library(readr)
sp_list_corrected_ver2 <- read_csv("Desktop/sp_list_corrected_ver2.csv")
View(sp_list_corrected_ver2)
library(readr)
sachin_sp_list <- read_csv("Desktop/sachin_sp_list.csv")
View(sachin_sp_list)
library(dplyr)
rename(sachin_sp_list, species = speciesname)
colnames(sachin_sp_list)
names(sachin_sp_list)[names(sachin_sp_list) == "species"] <- "speciesname"
names(sp_list_corrected_ver2)[names(sp_list_corrected_ver2)== "trnh_psba"] <- "psba""
joined_table <- right_join(sp_list_corrected_ver2, sachin_sp_list, by = )
names(sp_list_corrected_ver2)[names(sp_list_corrected_ver2)== "trnh_psba"] <- "psba"
joined_table <- right_join(sp_list_corrected_ver2, sachin_sp_list, by = speciesname)
names(sachin_sp_list)[names(sachin_sp_list) == "species"] <- "speciesname"
names(sp_list_corrected_ver2)[names(sp_list_corrected_ver2)== "trnh_psba"] <- "psba"
joined_table <- right_join(sp_list_corrected_ver2, sachin_sp_list, by = speciesname)
joined_table <- right_join(sp_list_corrected_ver2, sachin_sp_list, by = "speciesname")
rlang::last_error()
sp_list_corrected_ver2 %>% inner_join(., sachin_sp_list, by == "speciesname")
new_table <- inner_join(sp_list_corrected_ver2, sachin_sp_list, by == "speciesname")
sp_list_corrected_ver2 %>% inner_join(sachin_sp_list, by == "speciesname")
sp_list_corrected_ver2 %>% inner_join(sachin_sp_list, by == "speciesname")
sp_list_corrected_ver2 %>% inner_join(sachin_sp_list)
sp_list_corrected_ver2 %>% full_join(sachin_sp_list)
rm(sp_list_corrected_ver2)
View(sachin_sp_list)
library(readr)
sp_list_corrected_ver2 <- read_csv("Desktop/sp_list_corrected_ver2.csv")
View(sp_list_corrected_ver2)
sp_list_corrected_ver2 %>% right_join(sachin_sp_list, by ="speciesname")
species_test_200 <- read.csv("~/Desktop/species_200_rbcl.txt")
species_test_200
library(tidyverse)
species_test_200 <- species_test %>% mutate(species = str_replace(species, " ", "_"))
species_test_200 <- species_test_200 %>% mutate(species = str_replace(species, " ", "_"))
View(species_test_200)
species_test_200 <- read.csv("~/Desktop/species_200_rbcl.txt", he)
species_test_200
species_test_200 <- read.csv("~/Desktop/species_200_rbcl.txt", header = TRUE)
species_test_200 <- species_test_200 %>% mutate(species = str_replace(species, " ", "_"))
species_test
write_csv(species_test_200, "species_test.txt")
write_csv(species_test_200, "species_test_200.txt")
species_test_200 <- read.csv("~/Desktop/species_remaining.txt", header = TRUE)
species_remaining <- read.csv("~/Desktop/species_remaining.txt", header = TRUE)
species_remaining <- species_remaining %>% mutate(species = str_replace(species, " ", "_"))
species_remaining
write_csv(species_test_200, "/desktop/phylogenerator2/species_remaining.txt")
write_csv(species_test_200, "~/Desktop/species_remaining.txt")
write_csv(species_remaining, "~/Desktop/species_remaining.txt")
species_remaining <- read.csv("~/Desktop/species_remaining.txt", header = TRUE)
library(tidyverse)
species_remaining <- species_remaining %>% mutate(species = str_replace(species, " ", "_"))
species_remaining
species_remaining <- species_remaining %>% mutate(species = str_replace(species, " ", "_"))
species_remaining <- read.csv("~/Desktop/species_remaining.txt", header = TRUE)
species_remaining <- species_remaining %>% mutate(species = str_replace(species, " ", "_"))
species_remaining
write_csv(species_remaining, "~/Desktop/species_remaining.txt")
help(BIOMASS)
library(BIOMASS)
help(BIOMASS)
createCache()
raw_species_ver2 <- read.csv("~/Desktop/Project/sp_list_corrected_ver2.csv", header = TRUE)
raw_species_ver2 <- correctTaxo(genus = raw_species_ver2$genus, species = raw_species_ver2$species, useCache = TRUE)
View(raw_species_ver2)
raw_species_ver2 <- read.csv("~/Desktop/Project/sp_list_corrected_ver2.csv", header = TRUE)
raw_species_corrected <- correctTaxo(genus = raw_species_ver2$genus, species = raw_species_ver2$species, useCache = TRUE)
View(sp_list_corrected_ver2)
View(raw_species_corrected)
raw_species_corrected <- raw_species_ver2 %>% mutate(speciesnames)
raw_species_corrected <- left_join(raw_species_corrected, raw_species_ver2)
library(dplyr)
raw_species_corrected <- left_join(raw_species_corrected, raw_species_ver2)
colnames(raw_species_corrected) <- c(genusCorr, speciesCorr, nameModified)
colnames(raw_species_corrected) <- c("genusCorr, speciesCorr, nameModified")
colnames(raw_species_corrected) <- c("genusCorr", "speciesCorr", "nameModified")
raw_species_corrected <- left_join(raw_species_corrected, raw_species_ver2, by = "genusCorr")
raw_species_corrected <- left_join(raw_species_corrected, raw_species_ver2, by = c("genusCorr", "speciesCorr")
raw_species_corrected <- left_join(raw_species_corrected, raw_species_ver2, by = c("genusCorr", "speciesCorr"))
library(dplyr)
raw_species_corrected <- left_join(raw_species_corrected, raw_species_ver2, by = c("genusCorr", "speciesCorr"))
raw_species_ver2 <- read.csv("~/Desktop/Project/sp_list_corrected_ver2.csv", header = TRUE)
raw_species_corrected <- correctTaxo(genus = raw_species_ver2$genus, species = raw_species_ver2$species, useCache = TRUE)
colnames(raw_species_corrected) <- c("genusCorr", "speciesCorr", "nameModified")
raw_species_corrected <- left_join(raw_species_corrected, raw_species_ver2, by = c("genusCorr", "speciesCorr"))
try <- filter(raw_species_corrected$nameModified != "FALSE")
try <- filter(raw_species_corrected, nameModified != "FALSE")
View(try)
write.csv("~/Desktop", file = "corrected_names_comparison.csv")
write.csv("~/Desktop/", file = "corrected_names_comparison.csv")
write.csv(try, "~/Desktop/corrected_names_comparison.csv")
install.packages("Taxize")
install.packages("taxize")
library(taxize)
help(taxize)
mytree <- ape::read.tree("~/Downloads/tree-of-trees-master/trees/angiosperms_apg2009.new")
View(mytree)
plot(mytree)
Xplorefiles(from = "HOME", recursive = TRUE, ignore.case = TRUE)
editFileExtensions()
quit()
library(dplyr)
library(readr)
sp_list_corrected_ver2_Only_Names_and_genes <- read_csv("Downloads/sp_list_corrected_ver2 - Only Names and genes.csv")
View(sp_list_corrected_ver2_Only_Names_and_genes)
library(dplyr)
install.packages("dplyr")
library(dplyr)
View(sp_list_corrected_ver2_Only_Names_and_genes)
library(readxl)
bdj_08_e39677_s001 <- read_excel("Desktop/bdj-08-e39677-s001.xlsx")
View(bdj_08_e39677_s001)
colnames(bdj_08_e39677_s001)[5] <- 'matk'
colnames(bdj_08_e39677_s001)[6] <- 'rbcL'
bdj_combined <- right_join(sp_list_corrected_ver2_Only_Names_and_genes, bdj_08_e39677_s001, by = c('matk', 'rbcL'))
View(bdj_combined)
colnames(bdj_08_e39677_s001)[1] <- 'speciesnames'
bdj_08_e39677_s001 <- filter(bdj_08_e39677_s001, c('speciesnames', 'matk', "rbcL"))
bdj_08_e39677_s001 <- filter(bdj_08_e39677_s001, 'speciesnames', 'matk', "rbcL")
bdj_08_e39677_s001 <- filter(bdj_08_e39677_s001, speciesnames, matk, rbcL)
bdj_08_e39677_s001 <- select(bdj_08_e39677_s001, speciesnames, matk, rbcL)
bdj_combined <- right_join(sp_list_corrected_ver2_Only_Names_and_genes, bdj_08_e39677_s001, by = c('matk', 'rbcL'))
bdj_combined <- left_join(sp_list_corrected_ver2_Only_Names_and_genes, bdj_08_e39677_s001, by = c('matk', 'rbcL'))
bdj_combined <- left_join(sp_list_corrected_ver2_Only_Names_and_genes, bdj_08_e39677_s001, by = c('speciesnames', 'matk', 'rbcL'))
bdj_combined <- inner_join(sp_list_corrected_ver2_Only_Names_and_genes, bdj_08_e39677_s001, by = 'speciesnames')
bdj_inner <- inner_join(sp_list_corrected_ver2_Only_Names_and_genes, bdj_08_e39677_s001, by = 'speciesnames')
write.csv(bdj_inner, "~/Desktop/bdj_inner_join.csv")
library(tidyverse)
library(dplyr)
library(readr)
gbif_species_name_9Feb <- read_csv("Desktop/gbif_species_name_9Feb.csv")
View(gbif_species_name_9Feb)
gbif_species_name_9Feb %>% unique(species)
gbif_species_name_9Feb_unique <- unique(gbif_species_name_9Feb$species)
rm(gbif_species_name_9Feb_unique)
gbif_9Feb <- gbif_species_name_9Feb[!duplicated(gbif_species_name_9Feb$species)]
gbif_9Feb <- distinct(gbif_species_name_9Feb$species)
gbif_species_name_9Feb %>% distinct(gbif_species_name_9Feb$species)
new_gbif <- gbif_species_name_9Feb %>% distinct(gbif_species_name_9Feb$species)
View(new_gbif)
rm(new_gbif)
rm(gbif_species_name_9Feb)
install.packages("BIOMASS")
library(BIOMASS)
help(BIOMASS)
library(readr)
splist <- read_csv("Desktop/splist.csv",
col_names = FALSE)
View(splist)
`colnames(splist) <- "species_names"
`colnames(splist) <- c("species_names")
`colnames(splist) <- c("species_names")
colnames(splist) <- c("species_names")
q
xcdcd
q
(quit)
quit
colnames(splist) <- c("species_names")
splist <- splist %>% mutate(splist, species_names_copy = species_names)
splist <- mutate(splist, species_names_copy = species_names)
splist <- mutate(splist, species_names_copy = species_names)
library(dplyr)
splist <- mutate(splist, species_names_copy = species_names)
splist <- splist %>% mutate(., species_names_copy = species_names) %>%
separate(., species_names_copy, c("genus", "species"))
library(tidyr)
install.packages("tidyr")
install.packages("tidyr")
library(tidyr)
splist <- splist %>% mutate(., species_names_copy = species_names) %>%
separate(., species_names_copy, c("genus", "species"))
library(dplyr)
splist <- splist %>% mutate(., species_names_copy = species_names) %>%
separate(., species_names_copy, c("genus", "species"))
splist <- splist %>% mutate(., species_names_copy = species_names) %>%
separate(., species_names_copy, c("genus", "species"))
splist <- splist %>% mutate(., species_names_copy = species_names) %>%
separate(., species_names_copy, c("genus", "species"), by "_")
splist <- splist %>% mutate(., species_names_copy = species_names) %>%
separate(., species_names_copy, c("genus", "species"), by "_"))
splist <- splist %>% mutate(., species_names_copy = species_names) %>%
separate(., species_names_copy, c("genus", "species"), by "_")
splist <- splist %>% mutate(., species_names_copy = species_names) %>%
separate(., species_names_copy, c("genus", "species"), by = "_")
splist <- splist %>% mutate(., species_names_copy = species_names) %>%
separate(., species_names_copy, c("genus", "species"), sep = "_")
splist <- splist %>% mutate(., species_names_copy = species_names) %>%
separate(., col = species_names_copy, into = c("genus", "species"), sep = "_")
read.csv("~/Desktop/needs_correction.csv", header = TRUE)
needs_correction <- read.csv("~/Desktop/needs_correction.csv", header = TRUE)
library(APE)
library(ape)
library(BIOMASS)
View(needs_correction)
needs_correction <- read.csv("~/Desktop/needs_correction.csv", header = TRUE)
library(dplyr)
createCache()
corrected <- correctTaxo(genus = needs_correction$genus, species = needs_correction$species, useCache = TRUE)
install.packages("httr")
library(httr)
corrected <- correctTaxo(genus = needs_correction$genus, species = needs_correction$species, useCache = TRUE)
View(corrected)
write.csv(corrected, "~/Desktop/corrected.csv")
read.csv("~/Desktop/7k_species_file.csv")
previous <- read.csv("~/Desktop/7k_species_file.csv")
joined <- left.join(corrected, previous, by = "species_names")
library(dplyr)
joined <- left.join(corrected, previous, by = "species_names")
joined <- left_join(corrected, previous, by = "species_names")
View(previous)
View(corrected)
corrected <- mutate(corrected, species_names = genusCorrected, speciesCorrected)
corrected <- mutate(corrected, species_names = genusCorrected + speciesCorrected)
corrected <- unite(corrected, genusCorrected, speciesCorrected, sep = " ")
library(tidyr)
corrected <- unite(corrected, genusCorrected, speciesCorrected, sep = " ")
needs_correction <- read.csv("~/Desktop/needs_correction.csv", header = TRUE)
corrected <- correctTaxo(genus = needs_correction$genus, species = needs_correction$species, useCache = TRUE)
write.csv(corrected, "~/Desktop/corrected.csv")
species_list_final <- read.csv("~/Desktop/species_list_final")
species_list_final <- read.csv("~/Desktop/species_list_final.csv")
View(species_list_final)
joined <- left_join(species_list_final, previous, by = "species_names")
species_list_final <- read.csv("~/Desktop/species_list_final.csv")
previous <- read.csv("~/Desktop/7k_species_file.csv")
joined <- left_join(species_list_final, previous, by = "species_names")
joined <- left_join(species_list_final, previous, by = "speciesnames")
View(species_list_final)
species_list_final <- read.csv("~/Desktop/species_list_final.csv")
previous <- read.csv("~/Desktop/7k_species_file.csv")
joined <- left_join(species_list_final, previous, by = "speciesnames")
View(species_list_final)
View(joined)
write.csv(joined, "~/Desktp/combined_species_list_final")
write.csv(joined, "~/Desktp/combined_species_list_final.csv")
View(joined)
write.csv(joined, "~/Desktop/combined_species_list_final.csv")
species_list_final <- read.csv("~/Desktop/species_list_final.csv")
previous <- read.csv("~/Desktop/7k_species_file.csv")
joined <- left_join(species_list_final, previous, by = "speciesnames")
write.csv(joined, "~/Desktop/combined_species_list_final.csv")
View(joined)
previous <- read.csv("~/Desktop/7k_species_file.csv")
joined <- left_join(species_list_final, previous, by = "speciesnames")
View(joined)
View(previous)
write.csv(joined, "~/Desktop/combined_species_list_final.csv")
read.csv("~/Desktop/semini_species.csv")
semini_species <- read.csv("~/Desktop/semini_species.csv")
library(ape)
library(BIOMASS)
library(dplyr)
library(tidyr)
library(httr)
createCache()
all_combined <-full_join(joined, semini_species, by= c("speciesnames", "matk", "rbcL", "its1", "its2"))
View(species_list_final)
View(all_combined)
all_combined <-full_join(joined, semini_species, by= c("speciesnames", "matk","trnh_psba", "rbcL", "its1", "its2"))
write.csv(all_combined, "~/Desktop/final_dataset.csv ")
write.csv(all_combined, "~/Desktop/final_dataset.csv")
View(corrected)
View(joined)
View(semini_species)
library(ape)
library(BIOMASS)
createCache()
library(taxize)
createCache()
new_temp2 <- correctedTaxo(genus = temp$genus, species = temp$species, useCache = TRUE)
library(BIOMASS)
library(ape)
library(dplyr)
library(tidyr)
library(httr)
help(BIOMASS)
library(BIOMASS)
new_temp2 <- correctedTaxo(genus = temp$genus, species = temp$species, useCache = TRUE)
new_temp2 <- correctTaxo(genus = temp$genus, species = temp$species, useCache = TRUE)
temp <- read.csv("~/Downloads/final_dataset.csv")
new_temp2 <- correctTaxo(genus = temp$genus, species = temp$species, useCache = TRUE)
library(ape)
library(taxize)
library(BIOMASS)
library(taxonomizr)
library(dplyr)
temp <- read.csv("~/Downloads/final_dataset.csv")
new_temp2 <- correctTaxo(genus = temp$genus, species = temp$species, useCache = TRUE)
View(new_temp2)
View(temp)
rm(new_temp2)
rm(new_temp)
#getting the taxonomy of the genus from BIOMASS - getTaxonomy
new_temp <- getTaxonomy(genus = temp$genus, findOrder = TRUE)
library(BIOMASS)
#getting the taxonomy of the genus from BIOMASS - getTaxonomy
new_temp <- getTaxonomy(genus = temp$genus, findOrder = TRUE)
library(ape)
library(ape)
library(taxize)
library(BIOMASS)
#getting the taxonomy of the genus from BIOMASS - getTaxonomy
new_temp <- getTaxonomy(genus = temp$genus, findOrder = TRUE)
View(new_temp)
temp$X <- new_temp$family
View(temp)
temp <- mutate(temp, "order")
library(dplyr)
temp <- mutate(temp, "order")
temp$order <- new_temp$order
temp <- read.csv("~/Downloads/final_dataset.csv")
new_temp[1] <- "genus"
#getting the taxonomy of the genus from BIOMASS - getTaxonomy
new_temp <- getTaxonomy(genus = temp$genus, findOrder = TRUE)
colnames(new_temp) <- c("genus", "family", "order")
temp <- left_join(temp, new_temp, by = "genus")
write.csv(new_temp, "~/Desktop/file_for_grdip.csv")
write.csv(temp, "~/Desktop/file_for_grdip.csv")
### How will I know which one is the accepted name in the taxonomy using this?
library(taxize)
# Example dataframe containing plant names
df <- data.frame(plant_name = c("Acer rubrum", "Abies concolor", "Quercus alba", "Pinus ponderosa"))
# Apply get_accepted_names() to the plant_name column
df$accepted_name <- sapply(df$plant_name, get_accepted_names)
# View the updated dataframe
df
### How will I know which one is the accepted name in the taxonomy using this?
library(taxize)
# Example dataframe containing plant names
df <- data.frame(plant_name = c("Acer rubrum", "Abies concolor", "Quercus alba", "Pinus ponderosa"))
# Apply get_accepted_names() to the plant_name column
df$accepted_name <- sapply(df$plant_name, get_accepted_names)
# View the updated dataframe
df
### How will I know which one is the accepted name in the taxonomy using this?
library(taxize)
# Apply get_accepted_names() to the plant_name column
df$accepted_name <- sapply(df$plant_name, get_accepted_names)
library(ape)
library(dplyr)
library(BIOMASS)
# Apply get_accepted_names() to the plant_name column
df$accepted_name <- sapply(df$plant_name, get_accepted_names)
library(poweR)
# Example list of plant species
species_list <- c("Acer rubrum", "Abies concolor", "Quercus alba", "Pinus ponderosa")
# Initialize the POWO client
pwo_client <- powo_client()
library(poweR)
### Can I get the accepted names of the plant species from a database named "powo" using any R package ?
install.packages("poweR")
library(poweR)
### Can I get the accepted names of the plant species from a database named "powo" using any R package ?
install.packages("powo")
#U.Taxonstand
install.packages("U.Taxonstand")
install.packages("powo")
install.packages("poweR")
install.packages("devtools")
devtools::install_github("barnabywalker/kewr")
download_wcvp()
load_tol()
devtools::install_github("barnabywalker/kewr")
force = TRUE
devtools::install_github("barnabywalker/kewr")
devtools::install_github("barnabywalker/kewr", force = TRUE)
rm(force)
download_wcvp()
lookup_powo("320035-2")
lookup_ipni("987-2", type="publication")
library(poweR)
### Can I get the accepted names of the plant species from a database named "powo" using any R package ?
install.packages("poweR")
library(taxizedb)
june <- read.csv('june.csv', header = TRUE)
t <- tax_name(query = c(june$speciesnames), get = c("phylum","class", "order", "family", "genus"), db = "ncbi", use_entrez())
## Can I also resolve the same for mis-spellings or typos?
# Yes, you can use the correct_names() function from the taxize package to correct misspelled or typo-ridden plant names before using the get_accepted_names() function to obtain the accepted names.
library(taxize)
t <- tax_name(query = c(june$speciesnames), get = c("phylum","class", "order", "family", "genus"), db = "ncbi", use_entrez())
t <- tax_name(query = c(june$speciesnames), get = c("phylum","class", "order", "family", "genus"), db = "ipni", use_entrez())
t <- tax_name(query = c(june$speciesnames), get = c("order", "family", "genus"), db = "ipni")
t <- tax_name(query = c(june$speciesnames), get = c("order", "family", "genus"), db = "ipni")
library(BIOMASS)
june <- read.csv("~/Desktop/jun", header = TRUE)
june <- read.csv("~/Desktop/jun.csv", header = TRUE)
june <- read.csv("~/Desktop/jun.xlsx", header = TRUE)
june <- read.csv("~/Desktop/jun.csv", header = TRUE)
View(june)
june_taxanomy_dataset <- getTaxonomy(june$genus, findOrder =  TRUE)
View(june_taxanomy_dataset)
june_taxanomy_dataset <- getTaxonomy(june$genus)
View(june_taxanomy_dataset)
ndOrder =  TRUE
View(june_taxanomy_dataset)
june_taxanomy_dataset <- getTaxonomy(june$genus)
View(june_taxanomy_dataset)
june_taxanomy_dataset <- getTaxonomy(june$genus, findOrder = TRUE)
View(june_taxanomy_dataset)
write.csv(june_taxanomy_dataset, "~/Desktop/june_taxa.csv")
#install.packages("seqinr")
#install.packages("ape")
# install.packages("tidyverse")
# install.packages("readxl")
library(seqinr)
library(ape)
# library(dplyr)
library(tidyverse)
library(xlsx)
library(ape)x
library(ape)
library(BIOMASS)
library(dplyr)
library(tidyr)
library(httr)
createCache()
library(readr)
rbcL_sequences_final_matk_sequences_10_alignment_2 <- read_csv("Desktop/rbcL_sequences_final - matk_sequences_10 alignment 2.csv")
View(rbcL_sequences_final_matk_sequences_10_alignment_2)
library(readr)
rbcL_matK_names <- read_csv("Desktop/rbcL_sequences_final - matk_sequences_10 alignment 2.csv")
View(rbcL_matK_names)
rm(rbcL_sequences_final_matk_sequences_10_alignment_2)
taxonomy_1 <- getTaxonomy(genus = rbcL_matK_names$genus, findOrder = TRUE)
View(taxonomy_1)
write.csv(taxonomy_1, "~/Desktop/rbcL_matk_constraints", header = TRUE)
write.csv(taxonomy_1, "~/Desktop/rbcL_matk_constraints")
write.csv(taxonomy_1, "~/Desktop/rbcL_matk_constraints.csv")
install.packages("V.PhyloMaker")
install.packages("V.PhyloMaker2")
library(seqinr)
library(ape)
setwd(dir ="~/Desktop/Order-Wise trees/Boraginales")
Boraginales_rbcL <- read.csv("Boraginales_rbcL.csv")
Boraginales_rbcL_genbank_rbcL <- read.GenBank(Boraginales_rbcL$rbcL)
write.dna(Boraginales_rbcL_genbank_rbcL, file = "Boraginales_rbcL.fasta", format = "fasta", append = FALSE)
Boraginales_rbcL_seqinr <- read.fasta(file = "Boraginales_rbcL.fasta", seqtype = "DNA", as.string = TRUE, forceDNAtolower = FALSE)
write.fasta(sequences = Boraginales_rbcL_seqinr, names = Boraginales_rbcL$speciesname, file.out = "Boraginales_rbcL_sequences.fasta")
Boraginales_matK <- read.csv("Boraginales_matK.csv")
Boraginales_matK_genbank_matK <- read.GenBank(Boraginales_matK$matk)
write.dna(Boraginales_matK_genbank_matK, file = "Boraginales_matK.fasta", format = "fasta", append = FALSE)
Boraginales_matK_seqinr <- read.fasta(file = "Boraginales_matK.fasta", seqtype = "DNA", as.string = TRUE, forceDNAtolower = FALSE)
write.fasta(sequences = Boraginales_matK_seqinr, names = Boraginales_matK$speciesname, file.out = "Boraginales_matK_sequences.fasta")
Boraginales_trnH <- read.csv("Boraginales_trnH.csv")
Boraginales_trnH_genbank_trnH <- read.GenBank(Boraginales_trnH$trnh_psba)
write.dna(Boraginales_trnH_genbank_trnH, file = "Boraginales_trnH.fasta", format = "fasta", append = FALSE)
Boraginales_trnH_seqinr <- read.fasta(file = "Boraginales_trnH.fasta", seqtype = "DNA", as.string = TRUE, forceDNAtolower = FALSE)
write.fasta(sequences = Boraginales_trnH_seqinr, names = Boraginales_trnH$speciesname, file.out = "Boraginales_trnH_sequences.fasta")
setwd(dir ="~/Desktop/Order-Wise trees/Brassicales")
Brassicales_rbcL <- read.csv("Brassicales_rbcL.csv")
Brassicales_rbcL_genbank_rbcL <- read.GenBank(Brassicales_rbcL$rbcL)
write.dna(Brassicales_rbcL_genbank_rbcL, file = "Brassicales_rbcL.fasta", format = "fasta", append = FALSE)
Brassicales_rbcL_seqinr <- read.fasta(file = "Brassicales_rbcL.fasta", seqtype = "DNA", as.string = TRUE, forceDNAtolower = FALSE)
write.fasta(sequences = Brassicales_rbcL_seqinr, names = Brassicales_rbcL$speciesname, file.out = "Brassicales_rbcL_sequences.fasta")
Brassicales_matK <- read.csv("Brassicales_matK.csv")
Brassicales_matK_genbank_matK <- read.GenBank(Brassicales_matK$matk)
write.dna(Brassicales_matK_genbank_matK, file = "Brassicales_matK.fasta", format = "fasta", append = FALSE)
Brassicales_matK_seqinr <- read.fasta(file = "Brassicales_matK.fasta", seqtype = "DNA", as.string = TRUE, forceDNAtolower = FALSE)
write.fasta(sequences = Brassicales_matK_seqinr, names = Brassicales_matK$speciesname, file.out = "Brassicales_matK_sequences.fasta")
Brassicales_trnH <- read.csv("Brassicales_trnH.csv")
Brassicales_trnH_genbank_trnH <- read.GenBank(Brassicales_trnH$trnh_psba)
write.dna(Brassicales_trnH_genbank_trnH, file = "Brassicales_trnH.fasta", format = "fasta", append = FALSE)
Brassicales_trnH_seqinr <- read.fasta(file = "Brassicales_trnH.fasta", seqtype = "DNA", as.string = TRUE, forceDNAtolower = FALSE)
write.fasta(sequences = Brassicales_trnH_seqinr, names = Brassicales_trnH$speciesname, file.out = "Brassicales_trnH_sequences.fasta")
Brassicales_rbcL <- read.csv("Brassicales_rbcL.csv")
Brassicales_rbcL_genbank_rbcL <- read.GenBank(Brassicales_rbcL$rbcL)
write.dna(Brassicales_rbcL_genbank_rbcL, file = "Brassicales_rbcL.fasta", format = "fasta", append = FALSE)
Brassicales_rbcL_seqinr <- read.fasta(file = "Brassicales_rbcL.fasta", seqtype = "DNA", as.string = TRUE, forceDNAtolower = FALSE)
write.fasta(sequences = Brassicales_rbcL_seqinr, names = Brassicales_rbcL$speciesname, file.out = "Brassicales_rbcL_sequences.fasta")
Brassicales_matK <- read.csv("Brassicales_matK.csv")
Brassicales_matK_genbank_matK <- read.GenBank(Brassicales_matK$matk)
write.dna(Brassicales_matK_genbank_matK, file = "Brassicales_matK.fasta", format = "fasta", append = FALSE)
Brassicales_matK_seqinr <- read.fasta(file = "Brassicales_matK.fasta", seqtype = "DNA", as.string = TRUE, forceDNAtolower = FALSE)
write.fasta(sequences = Brassicales_matK_seqinr, names = Brassicales_matK$speciesname, file.out = "Brassicales_matK_sequences.fasta")
Brassicales_trnH <- read.csv("Brassicales_trnH.csv")
Brassicales_trnH_genbank_trnH <- read.GenBank(Brassicales_trnH$trnh_psba)
write.dna(Brassicales_trnH_genbank_trnH, file = "Brassicales_trnH.fasta", format = "fasta", append = FALSE)
Brassicales_trnH_seqinr <- read.fasta(file = "Brassicales_trnH.fasta", seqtype = "DNA", as.string = TRUE, forceDNAtolower = FALSE)
write.fasta(sequences = Brassicales_trnH_seqinr, names = Brassicales_trnH$speciesname, file.out = "Brassicales_trnH_sequences.fasta")
setwd(dir ="~/Desktop/Order-Wise trees/Caryophyllales")
Caryophyllales_rbcL <- read.csv("Caryophyllales_rbcL.csv")
Caryophyllales_rbcL_genbank_rbcL <- read.GenBank(Caryophyllales_rbcL$rbcL)
write.dna(Caryophyllales_rbcL_genbank_rbcL, file = "Caryophyllales_rbcL.fasta", format = "fasta", append = FALSE)
Caryophyllales_rbcL_seqinr <- read.fasta(file = "Caryophyllales_rbcL.fasta", seqtype = "DNA", as.string = TRUE, forceDNAtolower = FALSE)
write.fasta(sequences = Caryophyllales_rbcL_seqinr, names = Caryophyllales_rbcL$speciesname, file.out = "Caryophyllales_rbcL_sequences.fasta")
Caryophyllales_matK <- read.csv("Caryophyllales_matK.csv")
Caryophyllales_matK_genbank_matK <- read.GenBank(Caryophyllales_matK$matk)
write.dna(Caryophyllales_matK_genbank_matK, file = "Caryophyllales_matK.fasta", format = "fasta", append = FALSE)
Caryophyllales_matK_seqinr <- read.fasta(file = "Caryophyllales_matK.fasta", seqtype = "DNA", as.string = TRUE, forceDNAtolower = FALSE)
write.fasta(sequences = Caryophyllales_matK_seqinr, names = Caryophyllales_matK$speciesname, file.out = "Caryophyllales_matK_sequences.fasta")
Caryophyllales_trnH <- read.csv("Caryophyllales_trnH.csv")
Caryophyllales_trnH_genbank_trnH <- read.GenBank(Caryophyllales_trnH$trnh_psba)
write.dna(Caryophyllales_trnH_genbank_trnH, file = "Caryophyllales_trnH.fasta", format = "fasta", append = FALSE)
Caryophyllales_trnH_seqinr <- read.fasta(file = "Caryophyllales_trnH.fasta", seqtype = "DNA", as.string = TRUE, forceDNAtolower = FALSE)
write.fasta(sequences = Caryophyllales_trnH_seqinr, names = Caryophyllales_trnH$speciesname, file.out = "Caryophyllales_trnH_sequences.fasta")
Caryophyllales_trnH <- read.csv("Caryophyllales_trnH.csv")
Caryophyllales_trnH_genbank_trnH <- read.GenBank(Caryophyllales_trnH$trnh_psba)
write.dna(Caryophyllales_trnH_genbank_trnH, file = "Caryophyllales_trnH.fasta", format = "fasta", append = FALSE)
Caryophyllales_trnH_seqinr <- read.fasta(file = "Caryophyllales_trnH.fasta", seqtype = "DNA", as.string = TRUE, forceDNAtolower = FALSE)
write.fasta(sequences = Caryophyllales_trnH_seqinr, names = Caryophyllales_trnH$speciesname, file.out = "Caryophyllales_trnH_sequences.fasta")
